functor F(
  S2 : sig
    datatype a = A of a | B
  end
) =
struct
  datatype a = datatype S2.a
end
